#import "Level3Scene.h"


@implementation Level3Scene


-(id) init
{
    if( (self = [super init]) )
    {        
        self.layer = [Level3Layer node];
        [layer setDelegate:self];   //Should call this before initSprite !!!!!!        
        [self addChild:layer z:0];
        
        //init first wave
        [self startLevel];     
    }
    
    return self;
}

-(void) dealloc
{
    [super dealloc];
}

-(void) startWave:(int)wave
{
    switch (wave) {
        case 1:
            [layer createSprites: [self genAnswer:16 min:1 max:100] wave:wave];
            break;
        case 2:
            [layer createSprites: [self genAnswer:16 min:1 max:100] wave:wave];
            break;
        case 3:
            [layer createSprites: [self genAnswer:16 min:1 max:100] wave:wave];
            break;
        default:
            break;
    }
    
[layer startWave:wave];
}

@end
